From d3370063574c59735d414f56b1720511482248a1 Mon Sep 17 00:00:00 2001 From: tsteven4 Date: Mon, 19 Nov 2018 11:54:46 -0700 Subject: [PATCH] enhance sort filter for rtes & trks. (#273) --- filter_vecs.cc | 2 +- reference/sortfilter_description_out.gpx | 93 ++++++++++++++++ reference/sortfilter_in.gpx | 88 ++++++++++++++- reference/sortfilter_out.gpx | 29 ----- reference/sortfilter_rtedesc_out.gpx | 93 ++++++++++++++++ reference/sortfilter_rtename_out.gpx | 93 ++++++++++++++++ reference/sortfilter_rtenum_out.gpx | 93 ++++++++++++++++ reference/sortfilter_shortname_out.gpx | 93 ++++++++++++++++ reference/sortfilter_time_out.gpx | 93 ++++++++++++++++ reference/sortfilter_trkdesc_out.gpx | 93 ++++++++++++++++ reference/sortfilter_trkname_out.gpx | 93 ++++++++++++++++ reference/sortfilter_trknum_out.gpx | 93 ++++++++++++++++ sort.cc | 114 ++++++++++++++++---- sort.h | 80 +++++++++++--- testo.d/sort.test | 27 ++++- xmldoc/filters/options/sort-description.xml | 5 +- xmldoc/filters/options/sort-gcid.xml | 7 +- xmldoc/filters/options/sort-rtedesc.xml | 7 ++ xmldoc/filters/options/sort-rtename.xml | 7 ++ xmldoc/filters/options/sort-rtenum.xml | 7 ++ xmldoc/filters/options/sort-shortname.xml | 5 +- xmldoc/filters/options/sort-time.xml | 5 +- xmldoc/filters/options/sort-trkdesc.xml | 7 ++ xmldoc/filters/options/sort-trkname.xml | 7 ++ xmldoc/filters/options/sort-trknum.xml | 7 ++ xmldoc/filters/sort.xml | 3 +- 26 files changed, 1154 insertions(+), 90 deletions(-) create mode 100644 reference/sortfilter_description_out.gpx delete mode 100644 reference/sortfilter_out.gpx create mode 100644 reference/sortfilter_rtedesc_out.gpx create mode 100644 reference/sortfilter_rtename_out.gpx create mode 100644 reference/sortfilter_rtenum_out.gpx create mode 100644 reference/sortfilter_shortname_out.gpx create mode 100644 reference/sortfilter_time_out.gpx create mode 100644 reference/sortfilter_trkdesc_out.gpx create mode 100644 reference/sortfilter_trkname_out.gpx create mode 100644 reference/sortfilter_trknum_out.gpx create mode 100644 xmldoc/filters/options/sort-rtedesc.xml create mode 100644 xmldoc/filters/options/sort-rtename.xml create mode 100644 xmldoc/filters/options/sort-rtenum.xml create mode 100644 xmldoc/filters/options/sort-trkdesc.xml create mode 100644 xmldoc/filters/options/sort-trkname.xml create mode 100644 xmldoc/filters/options/sort-trknum.xml diff --git a/filter_vecs.cc b/filter_vecs.cc index 23e0443f5..6928f5d52 100644 --- a/filter_vecs.cc +++ b/filter_vecs.cc @@ -129,7 +129,7 @@ fl_vecs_t filter_vec_list[] = { { &sort, "sort", - "Rearrange waypoints by resorting", + "Rearrange waypoints, routes and/or tracks by resorting", }, { &stackfilt, diff --git a/reference/sortfilter_description_out.gpx b/reference/sortfilter_description_out.gpx new file mode 100644 index 000000000..6b9dd70df --- /dev/null +++ b/reference/sortfilter_description_out.gpx @@ -0,0 +1,93 @@ + + + + + + + b + a + a + + + + a + b + b + + + + d + c + c + + + + c + d + d + + + b + c + 11163 + + RPT001 + + + + a + b + 15939 + + RPT002 + + + + c + a + 10607 + + RPT003 + + + + d + d + 24282 + + RPT004 + + + + d + b + 31163 + + + + + + b + d + 15939 + + + + + + a + a + 607 + + + + + + c + c + 24282 + + + + + diff --git a/reference/sortfilter_in.gpx b/reference/sortfilter_in.gpx index 2fb72cad4..230d5fc28 100644 --- a/reference/sortfilter_in.gpx +++ b/reference/sortfilter_in.gpx @@ -1,15 +1,93 @@ - - + + + + + a + b + b - + + b + a + a - + + d + c + c - + + c + d + d + + b + c + 11163 + + RPT001 + + + + a + b + 15939 + + RPT002 + + + + c + a + 10607 + + RPT003 + + + + d + d + 24282 + + RPT004 + + + + d + b + 31163 + + + + + + b + d + 15939 + + + + + + a + a + 607 + + + + + + c + c + 24282 + + + + diff --git a/reference/sortfilter_out.gpx b/reference/sortfilter_out.gpx deleted file mode 100644 index 2feb73b02..000000000 --- a/reference/sortfilter_out.gpx +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - WPT004 - WPT004 - WPT004 - - - - WPT002 - WPT002 - WPT002 - - - - WPT001 - WPT001 - WPT001 - - - - WPT003 - WPT003 - WPT003 - - diff --git a/reference/sortfilter_rtedesc_out.gpx b/reference/sortfilter_rtedesc_out.gpx new file mode 100644 index 000000000..ce340d09a --- /dev/null +++ b/reference/sortfilter_rtedesc_out.gpx @@ -0,0 +1,93 @@ + + + + + + + a + b + b + + + + b + a + a + + + + d + c + c + + + + c + d + d + + + c + a + 10607 + + RPT003 + + + + a + b + 15939 + + RPT002 + + + + b + c + 11163 + + RPT001 + + + + d + d + 24282 + + RPT004 + + + + d + b + 31163 + + + + + + b + d + 15939 + + + + + + a + a + 607 + + + + + + c + c + 24282 + + + + + diff --git a/reference/sortfilter_rtename_out.gpx b/reference/sortfilter_rtename_out.gpx new file mode 100644 index 000000000..5715ae7f1 --- /dev/null +++ b/reference/sortfilter_rtename_out.gpx @@ -0,0 +1,93 @@ + + + + + + + a + b + b + + + + b + a + a + + + + d + c + c + + + + c + d + d + + + a + b + 15939 + + RPT002 + + + + b + c + 11163 + + RPT001 + + + + c + a + 10607 + + RPT003 + + + + d + d + 24282 + + RPT004 + + + + d + b + 31163 + + + + + + b + d + 15939 + + + + + + a + a + 607 + + + + + + c + c + 24282 + + + + + diff --git a/reference/sortfilter_rtenum_out.gpx b/reference/sortfilter_rtenum_out.gpx new file mode 100644 index 000000000..5a445c16c --- /dev/null +++ b/reference/sortfilter_rtenum_out.gpx @@ -0,0 +1,93 @@ + + + + + + + a + b + b + + + + b + a + a + + + + d + c + c + + + + c + d + d + + + c + a + 10607 + + RPT003 + + + + b + c + 11163 + + RPT001 + + + + a + b + 15939 + + RPT002 + + + + d + d + 24282 + + RPT004 + + + + d + b + 31163 + + + + + + b + d + 15939 + + + + + + a + a + 607 + + + + + + c + c + 24282 + + + + + diff --git a/reference/sortfilter_shortname_out.gpx b/reference/sortfilter_shortname_out.gpx new file mode 100644 index 000000000..54c9d0a55 --- /dev/null +++ b/reference/sortfilter_shortname_out.gpx @@ -0,0 +1,93 @@ + + + + + + + a + b + b + + + + b + a + a + + + + c + d + d + + + + d + c + c + + + b + c + 11163 + + RPT001 + + + + a + b + 15939 + + RPT002 + + + + c + a + 10607 + + RPT003 + + + + d + d + 24282 + + RPT004 + + + + d + b + 31163 + + + + + + b + d + 15939 + + + + + + a + a + 607 + + + + + + c + c + 24282 + + + + + diff --git a/reference/sortfilter_time_out.gpx b/reference/sortfilter_time_out.gpx new file mode 100644 index 000000000..488b10e82 --- /dev/null +++ b/reference/sortfilter_time_out.gpx @@ -0,0 +1,93 @@ + + + + + + + c + d + d + + + + b + a + a + + + + a + b + b + + + + d + c + c + + + b + c + 11163 + + RPT001 + + + + a + b + 15939 + + RPT002 + + + + c + a + 10607 + + RPT003 + + + + d + d + 24282 + + RPT004 + + + + d + b + 31163 + + + + + + b + d + 15939 + + + + + + a + a + 607 + + + + + + c + c + 24282 + + + + + diff --git a/reference/sortfilter_trkdesc_out.gpx b/reference/sortfilter_trkdesc_out.gpx new file mode 100644 index 000000000..90fd07074 --- /dev/null +++ b/reference/sortfilter_trkdesc_out.gpx @@ -0,0 +1,93 @@ + + + + + + + a + b + b + + + + b + a + a + + + + d + c + c + + + + c + d + d + + + b + c + 11163 + + RPT001 + + + + a + b + 15939 + + RPT002 + + + + c + a + 10607 + + RPT003 + + + + d + d + 24282 + + RPT004 + + + + a + a + 607 + + + + + + d + b + 31163 + + + + + + c + c + 24282 + + + + + + b + d + 15939 + + + + + diff --git a/reference/sortfilter_trkname_out.gpx b/reference/sortfilter_trkname_out.gpx new file mode 100644 index 000000000..38d69ccdc --- /dev/null +++ b/reference/sortfilter_trkname_out.gpx @@ -0,0 +1,93 @@ + + + + + + + a + b + b + + + + b + a + a + + + + d + c + c + + + + c + d + d + + + b + c + 11163 + + RPT001 + + + + a + b + 15939 + + RPT002 + + + + c + a + 10607 + + RPT003 + + + + d + d + 24282 + + RPT004 + + + + a + a + 607 + + + + + + b + d + 15939 + + + + + + c + c + 24282 + + + + + + d + b + 31163 + + + + + diff --git a/reference/sortfilter_trknum_out.gpx b/reference/sortfilter_trknum_out.gpx new file mode 100644 index 000000000..38d69ccdc --- /dev/null +++ b/reference/sortfilter_trknum_out.gpx @@ -0,0 +1,93 @@ + + + + + + + a + b + b + + + + b + a + a + + + + d + c + c + + + + c + d + d + + + b + c + 11163 + + RPT001 + + + + a + b + 15939 + + RPT002 + + + + c + a + 10607 + + RPT003 + + + + d + d + 24282 + + RPT004 + + + + a + a + 607 + + + + + + b + d + 15939 + + + + + + c + c + 24282 + + + + + + d + b + 31163 + + + + + diff --git a/sort.cc b/sort.cc index 8c096d345..c4242bc3f 100644 --- a/sort.cc +++ b/sort.cc @@ -21,29 +21,42 @@ #include "defs.h" #include "filterdefs.h" #include "sort.h" -#include +#include // for QString +#include // for abort + +extern queue my_route_head; +extern queue my_track_head; #if FILTERS_ENABLED template -inline int sgn(T v) { +inline int sgn(T v) +{ // Returns 1 if v > 0, -1 if v < 0, and 0 if v is zero return (v > T(0)) - (v < T(0)); } -int SortFilter::sort_comp(const queue* a, const queue* b) +template +inline int cmp(T a, T b) { - const Waypoint* x1 = reinterpret_cast(a); - const Waypoint* x2 = reinterpret_cast(b); +// Returns 1 if a > b, -1 if a < b, and 0 if a = b +// note possible overflow in computing sgn(a-b) is avoided. + return (a > b) - (a < b); +} - switch (sort_mode) { - case sm_gcid: - return x1->gc_data->id - x2->gc_data->id; - case sm_shortname: - return x1->shortname.compare(x2->shortname); - case sm_description: +int SortFilter::sort_comp_wpt(const queue* a, const queue* b) +{ + const Waypoint* x1 = reinterpret_cast(a); + const Waypoint* x2 = reinterpret_cast(b); + + switch (wpt_sort_mode) { + case SortModeWpt::description: return x1->description.compare(x2->description); - case sm_time: + case SortModeWpt::gcid: + return cmp(x1->gc_data->id, x2->gc_data->id); + case SortModeWpt::shortname: + return x1->shortname.compare(x2->shortname); + case SortModeWpt::time: return sgn(x2->GetCreationTime().msecsTo(x1->GetCreationTime())); default: abort(); @@ -51,31 +64,88 @@ int SortFilter::sort_comp(const queue* a, const queue* b) } } -int SortFilter::SortCompFunctor::operator()(const queue* a, const queue* b) +int SortFilter::sort_comp_rh(const queue* a, const queue* b) +{ + const route_head* x1 = reinterpret_cast(a); + const route_head* x2 = reinterpret_cast(b); + + switch (rh_sort_mode) { + case SortModeRteHd::description: + return x1->rte_desc.compare(x2->rte_desc); + case SortModeRteHd::name: + return x1->rte_name.compare(x2->rte_name); + case SortModeRteHd::number: + return cmp(x1->rte_num, x2->rte_num); + default: + abort(); + return 0; /* Internal caller error. */ + } +} + +int SortFilter::SortCompWptFunctor::operator()(const queue* a, const queue* b) +{ + return that->sort_comp_wpt(a, b); +} + +int SortFilter::SortCompRteHdFunctor::operator()(const queue* a, const queue* b) { - return that->sort_comp(a, b); + return that->sort_comp_rh(a, b); } void SortFilter::process() { - SortCompFunctor sort_comp(*this); + SortCompWptFunctor sort_comp_wpt_f(*this); + SortCompRteHdFunctor sort_comp_rh_f(*this); - sortqueue(&waypt_head, sort_comp); + if (wpt_sort_mode != SortModeWpt::none) { + sortqueue(&waypt_head, sort_comp_wpt_f); + } + if (rte_sort_mode != SortModeRteHd::none) { + rh_sort_mode = rte_sort_mode; + sortqueue(&my_route_head, sort_comp_rh_f); + } + if (trk_sort_mode != SortModeRteHd::none) { + rh_sort_mode = trk_sort_mode; + sortqueue(&my_track_head, sort_comp_rh_f); + } } void SortFilter::init() { + // sort waypts by + if (opt_sm_description) { + wpt_sort_mode = SortModeWpt::description; + } if (opt_sm_gcid) { - sort_mode = sm_gcid; + wpt_sort_mode = SortModeWpt::gcid; } if (opt_sm_shortname) { - sort_mode = sm_shortname; - } - if (opt_sm_description) { - sort_mode = sm_description; + wpt_sort_mode = SortModeWpt::shortname; } if (opt_sm_time) { - sort_mode = sm_time; + wpt_sort_mode = SortModeWpt::time; + } + + // sort routes by + if (opt_sm_rtedesc) { + rte_sort_mode = SortModeRteHd::description; + } + if (opt_sm_rtename) { + rte_sort_mode = SortModeRteHd::name; + } + if (opt_sm_rtenum) { + rte_sort_mode = SortModeRteHd::number; + } + + // sort tracks by + if (opt_sm_trkdesc) { + trk_sort_mode = SortModeRteHd::description; + } + if (opt_sm_trkname) { + trk_sort_mode = SortModeRteHd::name; + } + if (opt_sm_trknum) { + trk_sort_mode = SortModeRteHd::number; } } diff --git a/sort.h b/sort.h index 4dd852aa5..68e610f1f 100644 --- a/sort.h +++ b/sort.h @@ -39,44 +39,92 @@ public: void process() override; private: - typedef enum { - sm_unknown = 0, - sm_gcid, - sm_shortname, - sm_description, - sm_time - } sort_mode_; + enum class SortModeWpt { + none, + description, + gcid, + shortname, + time + }; + + SortModeWpt wpt_sort_mode = SortModeWpt::none; /* How are we sorting these? */ + + enum class SortModeRteHd { + none, + description, + name, + number + }; - sort_mode_ sort_mode = sm_shortname; /* How are we sorting these? */ + SortModeRteHd rte_sort_mode = SortModeRteHd::none; /* How are we sorting these? */ + SortModeRteHd trk_sort_mode = SortModeRteHd::none; /* How are we sorting these? */ + SortModeRteHd rh_sort_mode = SortModeRteHd::none; char* opt_sm_gcid, *opt_sm_shortname, *opt_sm_description, *opt_sm_time; + char* opt_sm_rtenum, *opt_sm_rtename, *opt_sm_rtedesc; + char* opt_sm_trknum, *opt_sm_trkname, *opt_sm_trkdesc; - arglist_t args[5] = { + arglist_t args[11] = { { - "gcid", &opt_sm_gcid, "Sort by numeric geocache ID", + "description", &opt_sm_description, "Sort waypoints by description", nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr }, { - "shortname", &opt_sm_shortname, "Sort by waypoint short name", + "gcid", &opt_sm_gcid, "Sort waypoints by numeric geocache ID", + nullptr, ARGTYPE_BEGIN_EXCL | ARGTYPE_BOOL, ARG_NOMINMAX, nullptr + }, + { + "shortname", &opt_sm_shortname, "Sort waypoints by short name", nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr }, { - "description", &opt_sm_description, "Sort by waypoint description", + "time", &opt_sm_time, "Sort waypoints by time", + nullptr, ARGTYPE_END_EXCL | ARGTYPE_BOOL, ARG_NOMINMAX, nullptr + }, + { + "rtedesc", &opt_sm_rtedesc, "Sort routes by description", + nullptr, ARGTYPE_END_EXCL | ARGTYPE_BOOL, ARG_NOMINMAX, nullptr + }, + { + "rtename", &opt_sm_rtename, "Sort routes by name", nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr }, { - "time", &opt_sm_time, "Sort by time", + "rtenum", &opt_sm_rtenum, "Sort routes by number", + nullptr, ARGTYPE_BEGIN_EXCL | ARGTYPE_BOOL, ARG_NOMINMAX, nullptr + }, + { + "trkdesc", &opt_sm_trkdesc, "Sort tracks by description", + nullptr, ARGTYPE_END_EXCL | ARGTYPE_BOOL, ARG_NOMINMAX, nullptr + }, + { + "trkname", &opt_sm_trkname, "Sort tracks by name", nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr }, + { + "trknum", &opt_sm_trknum, "Sort tracks by number", + nullptr, ARGTYPE_BEGIN_EXCL | ARGTYPE_BOOL, ARG_NOMINMAX, nullptr + }, ARG_TERMINATOR }; - int sort_comp(const queue* a, const queue* b); + int sort_comp_wpt(const queue* a, const queue* b); + int sort_comp_rh(const queue* a, const queue* b); + + class SortCompWptFunctor + { + public: + SortCompWptFunctor(SortFilter& obj) : that(&obj) {} + int operator()(const queue* a, const queue* b); + + private: + SortFilter* that; + }; - class SortCompFunctor + class SortCompRteHdFunctor { public: - SortCompFunctor(SortFilter& obj) : that(&obj) {} + SortCompRteHdFunctor(SortFilter& obj) : that(&obj) {} int operator()(const queue* a, const queue* b); private: diff --git a/testo.d/sort.test b/testo.d/sort.test index cc00b34c0..56c51a507 100644 --- a/testo.d/sort.test +++ b/testo.d/sort.test @@ -4,6 +4,29 @@ rm -f ${TMPDIR}/sortfilter* -gpsbabel -i gpx -f ${REFERENCE}/sortfilter_in.gpx -x sort,time -o gpx -F ${TMPDIR}/sortfilter_out.gpx -compare ${REFERENCE}/sortfilter_out.gpx ${TMPDIR}/sortfilter_out.gpx +gpsbabel -i gpx -f ${REFERENCE}/sortfilter_in.gpx -x sort,time -o gpx -F ${TMPDIR}/sortfilter_time_out.gpx +compare ${REFERENCE}/sortfilter_time_out.gpx ${TMPDIR}/sortfilter_time_out.gpx +gpsbabel -i gpx -f ${REFERENCE}/sortfilter_in.gpx -x sort,shortname -o gpx -F ${TMPDIR}/sortfilter_shortname_out.gpx +compare ${REFERENCE}/sortfilter_shortname_out.gpx ${TMPDIR}/sortfilter_shortname_out.gpx + +gpsbabel -i gpx -f ${REFERENCE}/sortfilter_in.gpx -x sort,description -o gpx -F ${TMPDIR}/sortfilter_description_out.gpx +compare ${REFERENCE}/sortfilter_description_out.gpx ${TMPDIR}/sortfilter_description_out.gpx + +gpsbabel -i gpx -f ${REFERENCE}/sortfilter_in.gpx -x sort,rtenum -o gpx -F ${TMPDIR}/sortfilter_rtenum_out.gpx +compare ${REFERENCE}/sortfilter_rtenum_out.gpx ${TMPDIR}/sortfilter_rtenum_out.gpx + +gpsbabel -i gpx -f ${REFERENCE}/sortfilter_in.gpx -x sort,rtename -o gpx -F ${TMPDIR}/sortfilter_rtename_out.gpx +compare ${REFERENCE}/sortfilter_rtename_out.gpx ${TMPDIR}/sortfilter_rtename_out.gpx + +gpsbabel -i gpx -f ${REFERENCE}/sortfilter_in.gpx -x sort,rtedesc -o gpx -F ${TMPDIR}/sortfilter_rtedesc_out.gpx +compare ${REFERENCE}/sortfilter_rtedesc_out.gpx ${TMPDIR}/sortfilter_rtedesc_out.gpx + +gpsbabel -i gpx -f ${REFERENCE}/sortfilter_in.gpx -x sort,trknum -o gpx -F ${TMPDIR}/sortfilter_trknum_out.gpx +compare ${REFERENCE}/sortfilter_trknum_out.gpx ${TMPDIR}/sortfilter_trknum_out.gpx + +gpsbabel -i gpx -f ${REFERENCE}/sortfilter_in.gpx -x sort,trkname -o gpx -F ${TMPDIR}/sortfilter_trkname_out.gpx +compare ${REFERENCE}/sortfilter_trkname_out.gpx ${TMPDIR}/sortfilter_trkname_out.gpx + +gpsbabel -i gpx -f ${REFERENCE}/sortfilter_in.gpx -x sort,trkdesc -o gpx -F ${TMPDIR}/sortfilter_trkdesc_out.gpx +compare ${REFERENCE}/sortfilter_trkdesc_out.gpx ${TMPDIR}/sortfilter_trkdesc_out.gpx diff --git a/xmldoc/filters/options/sort-description.xml b/xmldoc/filters/options/sort-description.xml index c629fce01..af625c1fb 100644 --- a/xmldoc/filters/options/sort-description.xml +++ b/xmldoc/filters/options/sort-description.xml @@ -1,8 +1,7 @@ -This option causes the waypoints to be sorted in alphabetical order by +This option causes the waypoints to be sorted in alphabetical order by description. -This option is not valid in combination with any other option. +This option is not valid in combination with gcid, shortname, and time. - diff --git a/xmldoc/filters/options/sort-gcid.xml b/xmldoc/filters/options/sort-gcid.xml index c2431b778..1d32d4c8d 100644 --- a/xmldoc/filters/options/sort-gcid.xml +++ b/xmldoc/filters/options/sort-gcid.xml @@ -1,8 +1,7 @@ -If the data contains Groundspeak geocache IDs, this option causes the -waypoints to be sorted in alphabetical order by geocache ID. +If the data contains Groundspeak geocache IDs, this option causes the +waypoints to be sorted in numerical order by geocache ID. -This option is not valid in combination with any other option. +This option is not valid in combination with description, shortname, and time. - diff --git a/xmldoc/filters/options/sort-rtedesc.xml b/xmldoc/filters/options/sort-rtedesc.xml new file mode 100644 index 000000000..4575b3a23 --- /dev/null +++ b/xmldoc/filters/options/sort-rtedesc.xml @@ -0,0 +1,7 @@ + +This option causes the routes to be sorted in alphabetical order by +description. + + +This option is not valid in combination with rtename and rtenum. + diff --git a/xmldoc/filters/options/sort-rtename.xml b/xmldoc/filters/options/sort-rtename.xml new file mode 100644 index 000000000..ca09a0dca --- /dev/null +++ b/xmldoc/filters/options/sort-rtename.xml @@ -0,0 +1,7 @@ + +This option causes the routes to be sorted in alphabetical order by +name. + + +This option is not valid in combination with rtedesc and rtenum. + diff --git a/xmldoc/filters/options/sort-rtenum.xml b/xmldoc/filters/options/sort-rtenum.xml new file mode 100644 index 000000000..448bf1861 --- /dev/null +++ b/xmldoc/filters/options/sort-rtenum.xml @@ -0,0 +1,7 @@ + +This option causes the routes to be sorted in numerical order by +number. + + +This option is not valid in combination with rtedesc and rtename. + diff --git a/xmldoc/filters/options/sort-shortname.xml b/xmldoc/filters/options/sort-shortname.xml index cd4075ccb..995cffb59 100644 --- a/xmldoc/filters/options/sort-shortname.xml +++ b/xmldoc/filters/options/sort-shortname.xml @@ -1,8 +1,7 @@ -This option causes the waypoints to be sorted in alphabetical order by +This option causes the waypoints to be sorted in alphabetical order by short name. -This option is not valid in combination with any other option. +This option is not valid in combination with description, gcid, and time. - diff --git a/xmldoc/filters/options/sort-time.xml b/xmldoc/filters/options/sort-time.xml index c43f60902..cdd1f45a7 100644 --- a/xmldoc/filters/options/sort-time.xml +++ b/xmldoc/filters/options/sort-time.xml @@ -1,8 +1,7 @@ -This option causes the waypoints to be sorted in chronological order by +This option causes the waypoints to be sorted in chronological order by creation time. -This option is not valid in combination with any other option. +This option is not valid in combination with description, gcid, and shortname. - diff --git a/xmldoc/filters/options/sort-trkdesc.xml b/xmldoc/filters/options/sort-trkdesc.xml new file mode 100644 index 000000000..93d149a5c --- /dev/null +++ b/xmldoc/filters/options/sort-trkdesc.xml @@ -0,0 +1,7 @@ + +This option causes the tracks to be sorted in alphabetical order by +description. + + +This option is not valid in combination with trkname and trknum. + diff --git a/xmldoc/filters/options/sort-trkname.xml b/xmldoc/filters/options/sort-trkname.xml new file mode 100644 index 000000000..4c74938ed --- /dev/null +++ b/xmldoc/filters/options/sort-trkname.xml @@ -0,0 +1,7 @@ + +This option causes the tracks to be sorted in alphabetical order by +name. + + +This option is not valid in combination with trkdesc and trknum. + diff --git a/xmldoc/filters/options/sort-trknum.xml b/xmldoc/filters/options/sort-trknum.xml new file mode 100644 index 000000000..a2c69607f --- /dev/null +++ b/xmldoc/filters/options/sort-trknum.xml @@ -0,0 +1,7 @@ + +This option causes the tracks to be sorted in numerical order by +number. + + +This option is not valid in combination with trkdesc and trkname. + diff --git a/xmldoc/filters/sort.xml b/xmldoc/filters/sort.xml index da4ad375e..f6af2dc60 100644 --- a/xmldoc/filters/sort.xml +++ b/xmldoc/filters/sort.xml @@ -1,5 +1,4 @@ -This filter sorts waypoints into alphabetical order by the selected field. -You must specify exactly one of the options. +This filter sorts waypoints, routes and/or tracks by the selected field(s). -- 2.30.2